import request from '@/utils/request'
// 策略管理列表
export const list = function(params) {
  return request({
    url: '/api/vm-service/policy/search',
    method: 'GET',
    params
  })
}

// 新增策略管理
export const addList = function(data) {
  return request({
    url: '/api/vm-service/policy',
    method: 'POST',
    data
  })
}
// 删除请求

export const delList = function(policyId) {
  return request({
    url: '/api/vm-service/policy/' + policyId,
    method: 'DELETE'
  })
}
// 修改策略请求

export const editList = function(data) {
  return request({
    url: '/api/vm-service/policy/' + data.policyId,
    method: 'PUT',
    data
  })
}

// 搜索策略请求

export const searchList = function(params) {
  return request({
    url: '/api/vm-service/policy/search',
    method: 'GET',
    params
  })
}

// 策略售货机请求

export const vmList = function(params) {
  return request({
    url: '/api/vm-service/policy/vmList/' + params.policyId,
    method: 'GET',
    params
  })
}
